<template>
    <div class="common_modal">
       <el-button type="primary" @click="showDialog">弹窗测试</el-button>
        <com-dialog ref="myDialog" @open="setDialogData" @close="callBack">
            <div slot="dialogBody">
                测试
            </div>
        </com-dialog>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                
            }
        },
        methods: {
            showDialog(){
                this.$refs.myDialog.showDialog();
            },
            setDialogData(){
                this.$message('打开弹窗初始化数据或组件')
            },
            callBack(){
                this.$message('关闭弹窗的回调')
            },
        },
    }
</script>

<style lang="less" scoped>

</style>